<template>
 <div>
  测试页面
  <div>{{num}}<el-button @click.native="handleAdd">+</el-button></div>
   <el-button @click.native="handleJumpPage">跳转页面</el-button>
 </div>
</template>


<script>
export default {
  name: 'test',
  components: {},
   data() {
      return {
        num: 1,
      };
  },
  created() {
    // 页面渲染时加载
    // this.getData() 调函数
  },
  methods:{
    // 接口请求案例
     getData(){
       this.axios
        .get("/api/v1/topics", {
          pahe: 1,
          limit: 20,
          tab: ''
        })
        .then((resp) => {
          console.log(21,resp)
        });
    },
    // 跳转页面案例
    handleJumpPage(){
       this.$router.push({ path: "/test1" });
    },
    handleAdd(){
      this.num++
    }
  }
}
</script>